<?php include $this->getViewFile('/common/Head'); ?>
<body class="J_scroll_fixed">
    <div class="wrap J_check_wrap">
        <?php include $this->getViewFile('/common/Nav') ?>
        <form class="J_ajaxForm" action="<?php echo AdminBase::U("add") ?>" method="post" id="myform">
            <div class="h_a">基本属性</div>
            <div class="table_full">
                <table width="100%" class="table_form contentWrap">
                    <tbody>
                        <tr>
                            <th width="80">所属栏目</th>
                            <td><select name="catid">
                                    <?php echo ContentCategoryModel::model()->htmlCategorySelectOption($catid); ?>
                                </select> <em>请先选择栏目</em></td>
                        </tr>
                        <tr>
                            <th>标题</th>
                            <td><input type="test" name="title" class="input length_6" id="title" value=""></td>
                        </tr>
                        <tr>
                            <th>关键字</th>
                            <td><input type="text" name="keywords" class="input length_4" id="keywords" value=""></td>
                        </tr>
                        <tr>
                            <th>简介</th>
                            <td><textarea name="description" class="length_6"></textarea></td>
                        </tr>
                        <tr>
                            <th>浏览人数</th>
                            <td><input type="text" name="view" class="input length_4" id="view" value=""></td>
                        </tr>
                        <tr>
                            <th>喜欢人数</th>
                            <td><input type="text" name="like_number" class="input length_4" id="like_number" value=""></td>
                        </tr>
                        <tr>
                            <th>是否精品</th>
                            <td><?php echo Form::radio(array('否', '是'), '1', 'name="is_hot"')  ?></td>
                        </tr>
                        <tr >
                            <th>类型</th>
                            <td ><select id="ishtml" onchange="incident(this)"> <option value="0"> 编辑器模式</option> <option value="1">Html代码模式</option></select> </td>
                        </tr>
                        <tr id="edit" >
                            <th>内容</th>
                            <td>
                                <script type="text/plain" id="content" name="content"></script>
                                <?php
                                echo Form::editor('content', 'full', 1, 1, '', 10, 300, 1);
                                ?>
                            </td>
                        </tr>
                        <tr id="htmlmod" style="display: none">
                            <th>内容</th>
                            <td>                 
                                <textarea name="content" style="min-width:800px;min-height: 600px;font-size: 14px;"></textarea>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="btn_wrap" style="z-index:30">
                <div class="btn_wrap_pd">             
                    <button class="btn btn_submit mr10 J_ajax_submit_btn" type="submit">添加</button>
                </div>
            </div>
        </form>
    </div>
    <script src="<?php echo $staticUrl; ?>statics/js/common.js"></script>
</body>
<script type="text/javascript">
   function   incident(x){
         var html = x.value;       
         if (html === '1') {
            $(" #edit").hide();
            $(' #htmlmod').show();
        }
        else {
            $(' #htmlmod').hide();
            $(' #edit').show();
        }
    }
</script>
</html>